// configUtils.js (处理通用配置和参数获取)
// 表格默认参数
export const getParams = (isMajor, additionalParams = {}, query) => {
  const baseParams = getCommonTableConfig(query);
  return isMajor
    ? { ...baseParams, ...additionalParams, eduLevel: 'ben' }
    : { ...baseParams, ...additionalParams };
};
// 默认表格配置
/**
 *
 * @param page 当前表格页码
 * @param newSelectSubjectData store中user模块
 * @param sgid 表格赋值的data
 */
// 默认表格配置
export const getCommonTableConfig = (query) => {
  const { page, provinceCode, sgid, year } = query;
  return {
    page: page.value,
    pid: provinceCode,
    year: year + '',
    code: [],
    sgid: sgid.join(',') || '',
  };
};
